package com.xbongbong.saas.model;

import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.paas.toolbox.wrap.IModel;
import com.xbongbong.pro.domain.entity.UpdateDataEntity;
import com.xbongbong.saas.domain.entity.competitor.CompetitorEntity;
import org.elasticsearch.action.support.WriteRequest;

import java.util.Collection;
import java.util.List;

/**
 * @author gaojie
 * @version v1.0
 * @date 2022/8/10 16:41
 * @since v1.0
 */
public interface CompetitorModel extends IModel<CompetitorEntity> {

    CompetitorEntity getByKey(Long id ,String corpid);

    /**
     * 批量更新
     * @param updateDataEntityList
     * @param corpid
     * @return: java.lang.Integer
     * @throws:
     */
    Integer updateBatch(List<UpdateDataEntity> updateDataEntityList,String corpid) throws XbbException;


    Integer updateBatch(List<UpdateDataEntity> updateDataEntityList, String corpid, WriteRequest.RefreshPolicy refreshPolicy) throws XbbException;



    /**
     * 批量删除
     * @param deleteIdList
     * @param corpid
     * @return
     * @throws XbbException
     */
    Integer deleteBatch(List<Long> deleteIdList,String corpid) throws XbbException;

    /**
     *
     * date: 2022/8/25 4:29 下午
     * @author yingjf
     * @param ids:
     * @param corpid:
     */
    List<CompetitorEntity> getByKeys(Collection<Long> ids , String corpid);
}
